package models;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.OneToMany;

import play.data.validation.Required;
import play.db.jpa.Model;

@Entity
public class University extends Model{
	@Required
	public String name;
	@Required
	public String description;
	@Required 
	public String address;
	@OneToMany (mappedBy = "uni")
	public List<Event> events;
	
	public University(String name, String address, String description)
	{
		this.name = name;
		this.address = address;
		this.description = description;
		this.events=new ArrayList<Event>();
	}
	
}
